package com.class05.static1.e_static;


/**
 * @ClassDescription:
 * @JdkVersion: 17
 * @Author: yxy
 * @Created: 2024/4/12 8:26
 */
public class Phone {
    //颜色
    private static String color;
    //品牌
    private static String brand;
    //    价格
    double price;
    //    型号
    static String model;

    public void callUp() {
        int[] phoneNum = new int[]{1, 3, 4, 8, 7, 6, 5, 5, 7, 8, 9};
        String s = phoneNum.toString();
        System.out.println("你好，你使用" + this.brand + ",拨打的号码为：" + s);

    }

    public static void playGame() {
        new Phone().callUp();
        System.out.println("打游戏");
    }

    //alt + insert

    //如果自定义了构造器，当前类就不在提供默认构造器
//    public Phone(double price) {
//        this.price = price;
//    }

    public static void main(String[] args) {
        Phone.brand = "小米";
        Phone.color = "香槟绿";
        Phone.model = "su7";
        Phone phone = new Phone();
        phone.price = 8888;
        phone.callUp();
        Phone.playGame();
    }


}
